/**
 * 确认框组件样式 - confirm.css
 */

/* 遮罩层 */
.confirm-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    z-index: 999;
    transition: background-color 0.3s ease;
}

.confirm-mask-show {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 确认框容器 */
.confirm-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    width: 400px;
}

.confirm-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 确认框内容 */
.confirm-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 头部 */
.confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.confirm-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.confirm-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.confirm-close:hover {
    color: #333;
    transform: scale(1.1);
}

/* 主体 */
.confirm-body {
    padding: 24px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.confirm-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.confirm-icon svg {
    width: 24px;
    height: 24px;
}

/* 不同类型的图标颜色 */
.confirm-info .confirm-icon {
    background-color: #e6f7ff;
    color: #1890ff;
}

.confirm-warning .confirm-icon {
    background-color: #fffbe6;
    color: #faad14;
}

.confirm-error .confirm-icon {
    background-color: #fff1f0;
    color: #ff4d4f;
}

.confirm-success .confirm-icon {
    background-color: #f6ffed;
    color: #52c41a;
}

.confirm-message {
    flex: 1;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    word-break: break-word;
}

/* 底部 */
.confirm-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    justify-content: flex-end;
}

/* 按钮 */
.confirm-btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: #333;
    font-weight: 500;
    min-width: 80px;
}

.confirm-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.confirm-btn:active {
    transform: scale(0.98);
}

.confirm-btn-cancel {
    order: 1;
}

.confirm-btn-ok {
    order: 2;
    border-color: #1890ff;
    background-color: #1890ff;
    color: white;
}

.confirm-btn-ok:hover {
    border-color: #40a9ff;
    background-color: #40a9ff;
    color: white;
}

/* 不同类型的按钮颜色 */
.confirm-warning .confirm-btn-ok {
    border-color: #faad14;
    background-color: #faad14;
}

.confirm-warning .confirm-btn-ok:hover {
    border-color: #ffc53d;
    background-color: #ffc53d;
}

.confirm-error .confirm-btn-ok {
    border-color: #ff4d4f;
    background-color: #ff4d4f;
}

.confirm-error .confirm-btn-ok:hover {
    border-color: #ff7875;
    background-color: #ff7875;
}

.confirm-success .confirm-btn-ok {
    border-color: #52c41a;
    background-color: #52c41a;
}

.confirm-success .confirm-btn-ok:hover {
    border-color: #85ce61;
    background-color: #85ce61;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .confirm-container {
        width: calc(100% - 40px);
        max-width: none;
    }

    .confirm-body {
        padding: 16px;
    }

    .confirm-footer {
        padding: 12px 16px;
        gap: 8px;
    }

    .confirm-btn {
        flex: 1;
        min-width: auto;
    }
}

/* 禁用状态 */
.confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.confirm-btn:disabled:hover {
    border-color: #d9d9d9;
    color: #333;
    background-color: white;
}

/* 焦点状态 */
.confirm-btn:focus {
    outline: 2px solid rgba(24, 144, 255, 0.2);
    outline-offset: 2px;
}
